home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / regmax / mainform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-02  |  7.6 KB  |  237 lines

  1. VERSION 2.00
  2. Begin Form MAINFORM 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "GBLIB2.EXE Demonstration. Press F1 for Help"
  6.    ClientHeight    =   1350
  7.    ClientLeft      =   2700
  8.    ClientTop       =   3915
  9.    ClientWidth     =   5850
  10.    Height          =   2040
  11.    Icon            =   MAINFORM.FRX:0000
  12.    Left            =   2640
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   1350
  16.    ScaleWidth      =   5850
  17.    Top             =   3285
  18.    Width           =   5970
  19.    Begin CommandButton btn_ReadRegData 
  20.       Caption         =   "Read &EXE Information"
  21.       FontBold        =   -1  'True
  22.       FontItalic      =   0   'False
  23.       FontName        =   "Arial"
  24.       FontSize        =   9
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   495
  28.       Left            =   3480
  29.       TabIndex        =   4
  30.       Top             =   720
  31.       Width           =   2235
  32.    End
  33.    Begin CommandButton btn_WriteRegData 
  34.       Caption         =   "Write E&XE Information"
  35.       FontBold        =   -1  'True
  36.       FontItalic      =   0   'False
  37.       FontName        =   "Arial"
  38.       FontSize        =   9
  39.       FontStrikethru  =   0   'False
  40.       FontUnderline   =   0   'False
  41.       Height          =   495
  42.       Left            =   3480
  43.       TabIndex        =   1
  44.       Top             =   120
  45.       Width           =   2235
  46.    End
  47.    Begin CommandButton btn_SYSDIR 
  48.       Caption         =   "&SYSDIR"
  49.       FontBold        =   0   'False
  50.       FontItalic      =   0   'False
  51.       FontName        =   "Arial"
  52.       FontSize        =   9
  53.       FontStrikethru  =   0   'False
  54.       FontUnderline   =   0   'False
  55.       Height          =   495
  56.       Left            =   2160
  57.       TabIndex        =   3
  58.       Top             =   720
  59.       Width           =   1215
  60.    End
  61.    Begin CommandButton btn_WINDIR 
  62.       Caption         =   "&WINDIR"
  63.       FontBold        =   0   'False
  64.       FontItalic      =   0   'False
  65.       FontName        =   "Arial"
  66.       FontSize        =   9
  67.       FontStrikethru  =   0   'False
  68.       FontUnderline   =   0   'False
  69.       Height          =   495
  70.       Left            =   2160
  71.       TabIndex        =   0
  72.       Top             =   120
  73.       Width           =   1215
  74.    End
  75.    Begin CommandButton btn_MakeAKey 
  76.       Caption         =   "Ma&keakey"
  77.       FontBold        =   0   'False
  78.       FontItalic      =   0   'False
  79.       FontName        =   "Arial"
  80.       FontSize        =   9
  81.       FontStrikethru  =   0   'False
  82.       FontUnderline   =   0   'False
  83.       Height          =   495
  84.       Left            =   840
  85.       TabIndex        =   2
  86.       Top             =   720
  87.       Width           =   1215
  88.    End
  89.    Begin CommandButton btn_Exit 
  90.       Cancel          =   -1  'True
  91.       Caption         =   "E&xit"
  92.       FontBold        =   -1  'True
  93.       FontItalic      =   0   'False
  94.       FontName        =   "Arial"
  95.       FontSize        =   9.75
  96.       FontStrikethru  =   0   'False
  97.       FontUnderline   =   0   'False
  98.       Height          =   495
  99.       Left            =   840
  100.       TabIndex        =   5
  101.       Top             =   120
  102.       Width           =   1215
  103.    End
  104.    Begin Label lbl_Copyright 
  105.       Alignment       =   2  'Center
  106.       BackColor       =   &H00C0C0C0&
  107.       Caption         =   "(c)1995 [GB]"
  108.       Height          =   435
  109.       Left            =   60
  110.       TabIndex        =   6
  111.       Top             =   720
  112.       Width           =   735
  113.       WordWrap        =   -1  'True
  114.    End
  115.    Begin Image img_Icon 
  116.       BorderStyle     =   1  'Fixed Single
  117.       Height          =   510
  118.       Left            =   180
  119.       Picture         =   MAINFORM.FRX:0302
  120.       Top             =   120
  121.       Width           =   510
  122.    End
  123.    Begin Menu mfile 
  124.       Caption         =   "&File"
  125.       Begin Menu mfile_Exit 
  126.          Caption         =   "E&xit"
  127.       End
  128.       Begin Menu mfile_About 
  129.          Caption         =   "&About"
  130.       End
  131.    End
  132. Option Explicit
  133. '   /* Modified 31/12/94 [GB] */
  134. '   /* Created 31/12/94 [GB] */
  135. '   //Form variable for messages//
  136. Dim msg As String
  137. Sub btn_Exit_Click ()
  138. '   /* Modified 30/12/94 [GB] */
  139. '   /* Created 30/12/94 [GB] */
  140. End Sub
  141. Sub btn_MakeAKey_Click ()
  142. '   /* Modified 31/12/94 [GB] */
  143. '   /* Created 31/12/94 [GB] */
  144. Dim Answer As Long
  145. Dim sz As String
  146. sz = InputBox$("Type in a string", "MakeAKey Demo", "Gordon Bamber")
  147. '   //Simple function. Possible crosscheck on USERNAME/USERORG? //
  148. '   //Result has to be a Long Integer Type//
  149. Answer = MakeAKey(sz)
  150. MsgBox "Key generated is " & Format$(Answer), 64, "MakeAKey"
  151. End Sub
  152. Sub btn_ReadRegData_Click ()
  153. '   /* Modified 31/12/94 [GB] */
  154. '   /* Created 31/12/94 [GB] */
  155. '   //Read the data into the two GLOBALs//
  156. '   //Quit out in development mode//
  157. If IsVBRunning() = 0 Then
  158.     GetDataFromEXE
  159.     DevMsg
  160.     Exit Sub
  161. End If
  162. '   //Reading a 'virgin' EXE file?//
  163. If USERNAME = "UNLICENSED" Or USERNAME = "" Then
  164.     MsgBox "This is an unbranded version of REGMAX", 64 + 4096, "Registration Information"
  165.     Exit Sub
  166. End If
  167. '   //Display embedded registration information//
  168. msg = "This software was registered" & Chr$(10)
  169. msg = msg & "on: " & BRANDDATE & Chr$(10)
  170. msg = msg & "to: " & USERNAME & Chr$(10)
  171. msg = msg & "of: " & USERORG
  172. MsgBox msg, 64 + 4096, "Registration Information"
  173. End Sub
  174. Sub btn_SYSDIR_Click ()
  175. '   /* Modified 30/12/94 [GB] */
  176. '   /* Created 30/12/94 [GB] */
  177. '   //A use for this would be in help/support, where//
  178. '   //you could show the client where his windows directory is//
  179. ShowSysDir
  180. End Sub
  181. Sub btn_WINDIR_Click ()
  182. '   /* Modified 30/12/94 [GB] */
  183. '   /* Created 30/12/94 [GB] */
  184. '   //A use for this would be in help/support, where//
  185. '   //you could show the client where his windows directory is//
  186. ShowWinDir
  187. End Sub
  188. Sub btn_WriteRegData_Click ()
  189. '   /* Modified 30/12/94 [GB] */
  190. '   /* Created 30/12/94 [GB] */
  191. '   //Quit out in development mode//
  192. If IsVBRunning() <> 0 Then
  193.     DevMsg
  194.     Exit Sub
  195. End If
  196. '   //Hide the main form//
  197. Me.Hide
  198. '   //Show regform non-modally//
  199. regform.Show
  200. End Sub
  201. Sub Form_Load ()
  202. '   /* Modified 02/01/95 [GB] */
  203. '   //Place the form correctly on the screen//
  204. Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
  205. '   //Skip the following if in development mode//
  206. If IsVBRunning() = 0 Then
  207.     '   //Get the GLOBALS//
  208.     GetDataFromEXE
  209.     '   //Is it a 'virgin' EXE? //
  210.     If USERNAME = "UNLICENSED" Then
  211.     MsgBox "This is an unlicensed copy of REGMAX", 64 + 4096, "Registration Information"
  212.     Exit Sub
  213.     End If
  214.     '   //Display embedded registration information//
  215.     msg = "This software was registered" & Chr$(10)
  216.     msg = msg & "on: " & BRANDDATE & Chr$(10)
  217.     msg = msg & "to: " & USERNAME & Chr$(10)
  218.     msg = msg & "of: " & USERORG
  219.     MsgBox msg, 64 + 4096, "Registration Information"
  220.     btn_WriteRegData.Enabled = False
  221. End If
  222. End Sub
  223. Sub mfile_About_Click ()
  224. '   /* Modified 03/01/95 [GB] */
  225. '   /* Created 03/01/95 [GB] */
  226. msg = "The REGMAX/GBLIB2 Project" & Chr$(10) & Chr$(10)
  227. msg = msg & "Source code Copyright" & Chr$(10)
  228. msg = msg & "(c)1994/5 Gordon Bamber" & Chr$(10) & Chr$(10)
  229. msg = msg & "Distributed to Visual Basic V3.0" & Chr$(10)
  230. msg = msg & "developers as FREEWARE"
  231. MsgBox msg, 64, "About"
  232. End Sub
  233. Sub mfile_Exit_Click ()
  234. '   /* Modified 03/01/95 [GB] */
  235. '   /* Created 03/01/95 [GB] */
  236. End Sub
  237.